package com.stylefeng.guns.common.constant.enums;

/**
 * 积分交易类型
 *
 * @author zgr
 * @date 2015年4月30日
 */
public enum IntegralTransType {
    REG(0, "注册"),
    INVITEREG(1, "邀请注册");


    private Integer code;

    private String message;

    IntegralTransType(Integer code, String message) {
        this.setCode(code);
        this.setMessage(message);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String valueOf(Integer status) {
        if (status == null) {
            return "";
        } else {
            for (IntegralTransType s : IntegralTransType.values()) {
                if (s.getCode() == status) {
                    return s.getMessage();
                }
            }
            return "";
        }
    }
}
